// kX Driver / kX Driver Interface / kX Driver Effects Library
// Copyright (c) Eugene Gavrilov, 2001-2005.
// All rights reserved

/*
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 */

// 10kX microcode
// Patch name: 'xrouting'

const char *xrouting_copyright="(c) Eugene Gavrilov, 2001-2008 All rights reserved";
const char *xrouting_engine="kX";
const char *xrouting_comment="supports negative volume, bit-accurate transfer, 8-point surround; $nobypass";
const char *xrouting_created="Sep 19 2003";
const char *xrouting_guid="313149FA-24FB-4f08-9C22-EB38B651BA58";

const char *xrouting_name="xrouting";
int xrouting_itramsize=0,xrouting_xtramsize=0;

dsp_register_info xrouting_info[]={
	{ "WaveL",0x4000,0x7,0xffff,0x0 },
	{ "WaveR",0x4001,0x7,0xffff,0x0 },
	{ "fL_nw_In",0x4004,0x7,0xffff,0x0 },
	{ "fR_ne_In",0x4005,0x7,0xffff,0x0 },
	{ "sL_sw_In",0x4008,0x7,0xffff,0x0 },
	{ "sR_se_In",0x4009,0x7,0xffff,0x0 },
	{ "center_n_In",0x4006,0x7,0xffff,0x0 },
	{ "lfe_In",0x4007,0x7,0xffff,0x0 },
	{ "w_In",0x4020,0x7,0xffff,0x0 },
	{ "e_In",0x4021,0x7,0xffff,0x0 },
	{ "s_In",0x4022,0x7,0xffff,0x0 },
	{ "top_In",0x4023,0x7,0xffff,0x0 },
//	{ "Bottom_In",0x4024,0x7,0xffff,0x0 },
    { "SynthL",0x4002,0x7,0xffff,0x0 },
	{ "SynthR",0x4003,0x7,0xffff,0x0 },
	{ "FX1_nw",0x4026,0x7,0xffff,0x0 },
	{ "FX1_ne",0x4027,0x7,0xffff,0x0 },
	{ "FX1_L",0x400a,0x7,0xffff,0x0 },
	{ "FX1_R",0x400b,0x7,0xffff,0x0 },
	{ "FX1_sL",0x400c,0x7,0xffff,0x0 },
	{ "FX1_sR",0x400d,0x7,0xffff,0x0 },
	{ "FX1_n",0x4028,0x7,0xffff,0x0 },
	{ "FX1_s",0x4029,0x7,0xffff,0x0 },
	{ "FX1_t",0x402a,0x7,0xffff,0x0 },
	{ "FX2_L",0x400e,0x7,0xffff,0x0 },
	{ "FX2_R",0x400f,0x7,0xffff,0x0 },
	{ "FX2_sL",0x4010,0x7,0xffff,0x0 },
	{ "FX2_sR",0x4011,0x7,0xffff,0x0 },
	{ "In0",0x4012,0x7,0xffff,0x0 },
	{ "In1",0x4013,0x7,0xffff,0x0 },
	{ "In2",0x4014,0x7,0xffff,0x0 },
	{ "In3",0x4015,0x7,0xffff,0x0 },
	{ "In4",0x4016,0x7,0xffff,0x0 },
	{ "In5",0x4017,0x7,0xffff,0x0 },
	{ "In6",0x4018,0x7,0xffff,0x0 },
	{ "In7",0x4019,0x7,0xffff,0x0 },
	{ "In8",0x401a,0x7,0xffff,0x0 },
	{ "In9",0x401b,0x7,0xffff,0x0 },
	{ "In10",0x401c,0x7,0xffff,0x0 },
	{ "In11",0x401d,0x7,0xffff,0x0 },
	{ "In12",0x401e,0x7,0xffff,0x0 },
	{ "In13",0x401f,0x7,0xffff,0x0 },
	{ "stereo_l",0x8000,0x8,0xffff,0x0 },
	{ "stereo_r",0x8001,0x8,0xffff,0x0 },
	{ "nw",0x8002,0x8,0xffff,0x0 },
	{ "ne",0x8003,0x8,0xffff,0x0 },
	{ "sw",0x8004,0x8,0xffff,0x0 },
	{ "se",0x8005,0x8,0xffff,0x0 },
	{ "n",0x8006,0x8,0xffff,0x0 },
	{ "lfe",0x8007,0x8,0xffff,0x0 },
	{ "w",0x8011,0x8,0xffff,0x0 },
	{ "e",0x8012,0x8,0xffff,0x0 },
	{ "s",0x8013,0x8,0xffff,0x0 },
	{ "top",0x8014,0x8,0xffff,0x0 },
//	{ "Bottom",0x8015,0x8,0xffff,0x0 },
	{ "RecL",0x8008,0x8,0xffff,0x0 },
	{ "RecR",0x8009,0x8,0xffff,0x0 },
	{ "RecWavLev",0x800a,0x4,0xffff,0x0 },
	{ "RecSynLev",0x800b,0x4,0xffff,0x0 },
	{ "RecFx1Lev",0x800c,0x4,0xffff,0x0 },
	{ "RecFx2Lev",0x800d,0x4,0xffff,0x0 },
	{ "RecRearLev",0x800e,0x4,0xffff,0x0 },
	{ "RecCLev",0x800f,0x4,0xffff,0x0 },
	{ "RecSWLev",0x8010,0x4,0xffff,0x0 },
};

dsp_code xrouting_code[]={
	{ 0x6,0x8000,0x4000,0x4002,0x2040 /*0x400a,0x400e */},
	{ 0x6,0x8001,0x4001,0x4003,0x2040 /* 0x400b,0x400f*/ },
	// { 0x6,0x8000,0x8000,0x4002,0x2040 },
	// { 0x6,0x8001,0x8001,0x4003,0x2040 },

    // 3543: these are macsn now
	{ 0x1,0x8008,0x2040,0x4000,0x800a },
	{ 0x1,0x8009,0x2040,0x4001,0x800a },
	{ 0x1,0x8008,0x8008,0x4026,0x800c }, // Note: was: FX1_L -> FX1_nw
	{ 0x1,0x8009,0x8009,0x4027,0x800c }, // Note: was: FX1_R -> FX1_ne
	{ 0x1,0x8008,0x8008,0x400e,0x800d },
	{ 0x1,0x8009,0x8009,0x400f,0x800d },
	{ 0x1,0x8008,0x8008,0x4002,0x800b },
	{ 0x1,0x8009,0x8009,0x4003,0x800b },

	{ 0x6,0x8000,0x8000,0x4012,0x4014 },
	{ 0x6,0x8000,0x8000,0x4016,0x4018 },
    { 0x6,0x8000,0x8000,0x401a,0x401c },
	{ 0x6,0x8000,0x8000,0x401e,0x2040 },

	{ 0x6,0x8001,0x8001,0x4013,0x4015 },
	{ 0x6,0x8001,0x8001,0x4017,0x4019 },
	{ 0x6,0x8001,0x8001,0x401b,0x401d },
	{ 0x6,0x8001,0x8001,0x401f,0x2040 },

	{ 0x6,0x8002,/*0x2040*/0x400e,0x4004,0x4026 }, // FX2_L/R -> nw, ne [was: w/e]
	{ 0x6,0x8003,/*0x2040*/0x400f,0x4005,0x4027 },
	{ 0x6,0x8006,0x2040,0x4006,0x4028 },
	{ 0x0,0x8007,0x4007,0x2040,0x2040 },
	{ 0x6,0x8004,0x4008,0x400c,0x4010 },
	{ 0x6,0x8005,0x4009,0x400d,0x4011 },
	{ 0x6,0x8011,0x4020,0x400a,/*0x400e*/0x2040},  // FX2_L/R -> nw, ne [was: w/e]
	{ 0x6,0x8012,0x4021,0x400b,/*0x400f*/0x2040},
	{ 0x6,0x8013,0x4022,0x2040,0x2040 },
	{ 0x6,0x8014,0x4023,0x2040,0x2040 },

    // 3543: these are macsn now
	{ 0x1,0x8008,0x8008,0x4004,0x800a },
	{ 0x1,0x8009,0x8009,0x4005,0x800a },
	{ 0x1,0x8008,0x8008,0x4008,0x800e },
	{ 0x1,0x8009,0x8009,0x4009,0x800e },
	{ 0x1,0x8008,0x8008,0x4006,0x800f },
	{ 0x1,0x8009,0x8009,0x4006,0x800f },
	{ 0x1,0x8008,0x8008,0x4007,0x8010 },
	{ 0x1,0x8009,0x8009,0x4007,0x8010 },
};

